import React, { useState } from 'react';
import ChildrenOne from './ChildrenOne';
import './index.less'
const Home = () => {

  const [valueState, _valueState] = useState<number>(0)
  return <div>
    <div className="fzj">

      <div className="">父组件</div>
      <br />

      <div className="">valueState的值为--{valueState}</div>
      <br />
      
      <div className='btn' onClick={() => _valueState(1)}>改valueState为 1</div>
      <div className='btn' onClick={() => _valueState(2)}>改valueState为 2</div>
    </div>
    <br />

    <div className='zzj'>
      <div>子组件</div>
      <ChildrenOne valueState={valueState} _valueState={ _valueState}></ChildrenOne>
    </div>
  </div>;
};

export default Home;
